/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2021-12-13     xu       the first version
 */
#ifndef BOARD_BSP_SPI_H_
#define BOARD_BSP_SPI_H_

#include <stdint.h>
#include <rtthread.h>
#include <drivers/spi.h>
#include "driver_spi.h"

void bsp_spi_init(void);

void bsp_spi_lock(void);

void bsp_spi_unlock(void);

void bsp_spi_send(uint8_t byte);

uint8_t bsp_spi_recv();

void bsp_spi_send_bytes(uint8_t* buffer, uint32_t size);

void bsp_spi_recv_bytes(uint8_t* buffer, uint32_t size);

#endif /* BOARD_BSP_SPI_H_ */
